1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 29 module derelict.glib.gbookmarkfile; 30 31 import derelict.glib.gerror; 32 import derelict.glib.gtypes; 33 import derelict.glib.gquark; 34 import derelict.glib.glibconfig; 35 import core.stdc.config; 36 import core.stdc.time; 37 38 alias _Anonymous_0 GBookmarkFileError; 39 alias _GBookmarkFile GBookmarkFile; 40 41 enum _Anonymous_0 42 { 43 G_BOOKMARK_FILE_ERROR_INVALID_URI = 0, 44 G_BOOKMARK_FILE_ERROR_INVALID_VALUE = 1, 45 G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED = 2, 46 G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND = 3, 47 G_BOOKMARK_FILE_ERROR_READ = 4, 48 G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING = 5, 49 G_BOOKMARK_FILE_ERROR_WRITE = 6, 50 G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND = 7 51 } 52 53 struct _GBookmarkFile; 54 55 version(Derelict_Link_Static) 56 { 57 extern( C ) nothrow 58 { 59 GQuark g_bookmark_file_error_quark(); 60 GBookmarkFile* g_bookmark_file_new(); 61 void g_bookmark_file_free(GBookmarkFile* bookmark); 62 gboolean g_bookmark_file_load_from_file(GBookmarkFile* bookmark, const(gchar)* filename, GError** error); 63 gboolean g_bookmark_file_load_from_data(GBookmarkFile* bookmark, const(gchar)* data, gsize length, GError** error); 64 gboolean g_bookmark_file_load_from_data_dirs(GBookmarkFile* bookmark, const(gchar)* file, gchar** full_path, GError** error); 65 gchar* g_bookmark_file_to_data(GBookmarkFile* bookmark, gsize* length, GError** error); 66 gboolean g_bookmark_file_to_file(GBookmarkFile* bookmark, const(gchar)* filename, GError** error); 67 void g_bookmark_file_set_title(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* title); 68 gchar* g_bookmark_file_get_title(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 69 void g_bookmark_file_set_description(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* description); 70 gchar* g_bookmark_file_get_description(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 71 void g_bookmark_file_set_mime_type(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* mime_type); 72 gchar* g_bookmark_file_get_mime_type(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 73 void g_bookmark_file_set_groups(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar*)* groups, gsize length); 74 void g_bookmark_file_add_group(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group); 75 gboolean g_bookmark_file_has_group(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group, GError** error); 76 gchar** g_bookmark_file_get_groups(GBookmarkFile* bookmark, const(gchar)* uri, gsize* length, GError** error); 77 void g_bookmark_file_add_application(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, const(gchar)* exec); 78 gboolean g_bookmark_file_has_application(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, GError** error); 79 gchar** g_bookmark_file_get_applications(GBookmarkFile* bookmark, const(gchar)* uri, gsize* length, GError** error); 80 gboolean g_bookmark_file_set_app_info(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, const(gchar)* exec, gint count, time_t stamp, GError** error); 81 gboolean g_bookmark_file_get_app_info(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, gchar** exec, guint* count, time_t* stamp, GError** error); 82 void g_bookmark_file_set_is_private(GBookmarkFile* bookmark, const(gchar)* uri, gboolean is_private); 83 gboolean g_bookmark_file_get_is_private(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 84 void g_bookmark_file_set_icon(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* href, const(gchar)* mime_type); 85 gboolean g_bookmark_file_get_icon(GBookmarkFile* bookmark, const(gchar)* uri, gchar** href, gchar** mime_type, GError** error); 86 void g_bookmark_file_set_added(GBookmarkFile* bookmark, const(gchar)* uri, time_t added); 87 time_t g_bookmark_file_get_added(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 88 void g_bookmark_file_set_modified(GBookmarkFile* bookmark, const(gchar)* uri, time_t modified); 89 time_t g_bookmark_file_get_modified(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 90 void g_bookmark_file_set_visited(GBookmarkFile* bookmark, const(gchar)* uri, time_t visited); 91 time_t g_bookmark_file_get_visited(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 92 gboolean g_bookmark_file_has_item(GBookmarkFile* bookmark, const(gchar)* uri); 93 gint g_bookmark_file_get_size(GBookmarkFile* bookmark); 94 gchar** g_bookmark_file_get_uris(GBookmarkFile* bookmark, gsize* length); 95 gboolean g_bookmark_file_remove_group(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group, GError** error); 96 gboolean g_bookmark_file_remove_application(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, GError** error); 97 gboolean g_bookmark_file_remove_item(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 98 gboolean g_bookmark_file_move_item(GBookmarkFile* bookmark, const(gchar)* old_uri, const(gchar)* new_uri, GError** error); 99 } 100 } 101 else 102 { 103 extern( C ) nothrow 104 { 105 alias da_g_bookmark_file_error_quark = GQuark function(); 106 alias da_g_bookmark_file_new = GBookmarkFile* function(); 107 alias da_g_bookmark_file_free = void function(GBookmarkFile* bookmark); 108 alias da_g_bookmark_file_load_from_file = gboolean function(GBookmarkFile* bookmark, const(gchar)* filename, GError** error); 109 alias da_g_bookmark_file_load_from_data = gboolean function(GBookmarkFile* bookmark, const(gchar)* data, gsize length, GError** error); 110 alias da_g_bookmark_file_load_from_data_dirs = gboolean function(GBookmarkFile* bookmark, const(gchar)* file, gchar** full_path, GError** error); 111 alias da_g_bookmark_file_to_data = gchar* function(GBookmarkFile* bookmark, gsize* length, GError** error); 112 alias da_g_bookmark_file_to_file = gboolean function(GBookmarkFile* bookmark, const(gchar)* filename, GError** error); 113 alias da_g_bookmark_file_set_title = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* title); 114 alias da_g_bookmark_file_get_title = gchar* function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 115 alias da_g_bookmark_file_set_description = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* description); 116 alias da_g_bookmark_file_get_description = gchar* function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 117 alias da_g_bookmark_file_set_mime_type = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* mime_type); 118 alias da_g_bookmark_file_get_mime_type = gchar* function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 119 alias da_g_bookmark_file_set_groups = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar*)* groups, gsize length); 120 alias da_g_bookmark_file_add_group = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group); 121 alias da_g_bookmark_file_has_group = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group, GError** error); 122 alias da_g_bookmark_file_get_groups = gchar** function(GBookmarkFile* bookmark, const(gchar)* uri, gsize* length, GError** error); 123 alias da_g_bookmark_file_add_application = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, const(gchar)* exec); 124 alias da_g_bookmark_file_has_application = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, GError** error); 125 alias da_g_bookmark_file_get_applications = gchar** function(GBookmarkFile* bookmark, const(gchar)* uri, gsize* length, GError** error); 126 alias da_g_bookmark_file_set_app_info = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, const(gchar)* exec, gint count, time_t stamp, GError** error); 127 alias da_g_bookmark_file_get_app_info = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, gchar** exec, guint* count, time_t* stamp, GError** error); 128 alias da_g_bookmark_file_set_is_private = void function(GBookmarkFile* bookmark, const(gchar)* uri, gboolean is_private); 129 alias da_g_bookmark_file_get_is_private = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 130 alias da_g_bookmark_file_set_icon = void function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* href, const(gchar)* mime_type); 131 alias da_g_bookmark_file_get_icon = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, gchar** href, gchar** mime_type, GError** error); 132 alias da_g_bookmark_file_set_added = void function(GBookmarkFile* bookmark, const(gchar)* uri, time_t added); 133 alias da_g_bookmark_file_get_added = time_t function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 134 alias da_g_bookmark_file_set_modified = void function(GBookmarkFile* bookmark, const(gchar)* uri, time_t modified); 135 alias da_g_bookmark_file_get_modified = time_t function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 136 alias da_g_bookmark_file_set_visited = void function(GBookmarkFile* bookmark, const(gchar)* uri, time_t visited); 137 alias da_g_bookmark_file_get_visited = time_t function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 138 alias da_g_bookmark_file_has_item = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri); 139 alias da_g_bookmark_file_get_size = gint function(GBookmarkFile* bookmark); 140 alias da_g_bookmark_file_get_uris = gchar** function(GBookmarkFile* bookmark, gsize* length); 141 alias da_g_bookmark_file_remove_group = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* group, GError** error); 142 alias da_g_bookmark_file_remove_application = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, const(gchar)* name, GError** error); 143 alias da_g_bookmark_file_remove_item = gboolean function(GBookmarkFile* bookmark, const(gchar)* uri, GError** error); 144 alias da_g_bookmark_file_move_item = gboolean function(GBookmarkFile* bookmark, const(gchar)* old_uri, const(gchar)* new_uri, GError** error); 145 } 146 147 __gshared 148 { 149 da_g_bookmark_file_error_quark g_bookmark_file_error_quark; 150 da_g_bookmark_file_new g_bookmark_file_new; 151 da_g_bookmark_file_free g_bookmark_file_free; 152 da_g_bookmark_file_load_from_file g_bookmark_file_load_from_file; 153 da_g_bookmark_file_load_from_data g_bookmark_file_load_from_data; 154 da_g_bookmark_file_load_from_data_dirs g_bookmark_file_load_from_data_dirs; 155 da_g_bookmark_file_to_data g_bookmark_file_to_data; 156 da_g_bookmark_file_to_file g_bookmark_file_to_file; 157 da_g_bookmark_file_set_title g_bookmark_file_set_title; 158 da_g_bookmark_file_get_title g_bookmark_file_get_title; 159 da_g_bookmark_file_set_description g_bookmark_file_set_description; 160 da_g_bookmark_file_get_description g_bookmark_file_get_description; 161 da_g_bookmark_file_set_mime_type g_bookmark_file_set_mime_type; 162 da_g_bookmark_file_get_mime_type g_bookmark_file_get_mime_type; 163 da_g_bookmark_file_set_groups g_bookmark_file_set_groups; 164 da_g_bookmark_file_add_group g_bookmark_file_add_group; 165 da_g_bookmark_file_has_group g_bookmark_file_has_group; 166 da_g_bookmark_file_get_groups g_bookmark_file_get_groups; 167 da_g_bookmark_file_add_application g_bookmark_file_add_application; 168 da_g_bookmark_file_has_application g_bookmark_file_has_application; 169 da_g_bookmark_file_get_applications g_bookmark_file_get_applications; 170 da_g_bookmark_file_set_app_info g_bookmark_file_set_app_info; 171 da_g_bookmark_file_get_app_info g_bookmark_file_get_app_info; 172 da_g_bookmark_file_set_is_private g_bookmark_file_set_is_private; 173 da_g_bookmark_file_get_is_private g_bookmark_file_get_is_private; 174 da_g_bookmark_file_set_icon g_bookmark_file_set_icon; 175 da_g_bookmark_file_get_icon g_bookmark_file_get_icon; 176 da_g_bookmark_file_set_added g_bookmark_file_set_added; 177 da_g_bookmark_file_get_added g_bookmark_file_get_added; 178 da_g_bookmark_file_set_modified g_bookmark_file_set_modified; 179 da_g_bookmark_file_get_modified g_bookmark_file_get_modified; 180 da_g_bookmark_file_set_visited g_bookmark_file_set_visited; 181 da_g_bookmark_file_get_visited g_bookmark_file_get_visited; 182 da_g_bookmark_file_has_item g_bookmark_file_has_item; 183 da_g_bookmark_file_get_size g_bookmark_file_get_size; 184 da_g_bookmark_file_get_uris g_bookmark_file_get_uris; 185 da_g_bookmark_file_remove_group g_bookmark_file_remove_group; 186 da_g_bookmark_file_remove_application g_bookmark_file_remove_application; 187 da_g_bookmark_file_remove_item g_bookmark_file_remove_item; 188 da_g_bookmark_file_move_item g_bookmark_file_move_item; 189 } 190 } 191 192 193